import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Color;
import java.util.Random;

public class bullsEye extends JPanel{
	private Random rgb = new Random();

	
	public void paintComponent(Graphics gg){
		super.paintComponent(gg);
		int width=super.getWidth();
		int height=super.getHeight();
		int d=(width<height ? width:height);
		int x=0;
		int y=0;
		
	  while(x<width/2-20){
		int r=rgb.nextInt(255);
		int g=rgb.nextInt(255);
		int b=rgb.nextInt(255);
		
		Color ngjyra=new Color(r,g,b);
		
		gg.setColor(ngjyra);
		gg.fillOval(x, y, d, d);
		
		x+=20;
		y+=20;
		d-=40;
	  }
		
		
	}
}
